//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package commands;

import common.ByteStream;

public class BuyGoodsWithDiamonds extends LogicCommand {
    private final int goodId;
    private final int id1;
    private final int id2;
    private final int cmdId = 39;

    public BuyGoodsWithDiamonds(int tt, int goodid, int id1, int id2) {
        super(tt);
        this.goodId = goodid;
        this.id1 = id1;
        this.id2 = id2;
    }

    public int getCommandId() {
        return 39;
    }

    public void encode(ByteStream stream) {
        stream.writeInt(39);
        stream.writeByte((byte)1);
        stream.writeInt(this.goodId);
        stream.writeInt(1);
        stream.writeByte((byte)-24);
        stream.writeInt(this.id1);
        stream.writeInt(this.id2);
        stream.writeInt(this.ticksWhenTouch().intValue());
    }
}
